/*
 * 处理 user 相关的操作
 */

import axios from '@/utils/request'

/**
 * 用户登陆
 * @param {*} mobile 手机号
 * @param {*} code 密码
 */
export const userLogin = (mobile, code) => {
  return axios({
    method: 'post',
    url: '/app/v1_0/authorizations',
    data: {
      mobile,
      code
    }
  })
}

export const getUserInfo = () => {
  return axios({
    method: 'GET',
    url: '/app/v1_0/user/profile'
  })
}
